import 'package:taonile/generated/json/base/json_convert_content.dart';
import 'package:taonile/entity/my_team_entity.dart';

MyTeamEntity $MyTeamEntityFromJson(Map<String, dynamic> json) {
	final MyTeamEntity myTeamEntity = MyTeamEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		myTeamEntity.code = code;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		myTeamEntity.msg = msg;
	}
	final MyTeamData? data = jsonConvert.convert<MyTeamData>(json['data']);
	if (data != null) {
		myTeamEntity.data = data;
	}
	return myTeamEntity;
}

Map<String, dynamic> $MyTeamEntityToJson(MyTeamEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['data'] = entity.data.toJson();
	return data;
}

MyTeamData $MyTeamDataFromJson(Map<String, dynamic> json) {
	final MyTeamData myTeamData = MyTeamData();
	final MyTeamDataInfo? info = jsonConvert.convert<MyTeamDataInfo>(json['info']);
	if (info != null) {
		myTeamData.info = info;
	}
	final List<MyTeamDataList>? list = jsonConvert.convertListNotNull<MyTeamDataList>(json['list']);
	if (list != null) {
		myTeamData.list = list;
	}
	return myTeamData;
}

Map<String, dynamic> $MyTeamDataToJson(MyTeamData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['info'] = entity.info.toJson();
	data['list'] =  entity.list.map((v) => v.toJson()).toList();
	return data;
}

MyTeamDataInfo $MyTeamDataInfoFromJson(Map<String, dynamic> json) {
	final MyTeamDataInfo myTeamDataInfo = MyTeamDataInfo();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		myTeamDataInfo.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		myTeamDataInfo.name = name;
	}
	final String? avatar = jsonConvert.convert<String>(json['avatar']);
	if (avatar != null) {
		myTeamDataInfo.avatar = avatar;
	}
	final String? levelId = jsonConvert.convert<String>(json['level_id']);
	if (levelId != null) {
		myTeamDataInfo.levelId = levelId;
	}
	final String? copartnerId = jsonConvert.convert<String>(json['copartner_id']);
	if (copartnerId != null) {
		myTeamDataInfo.copartnerId = copartnerId;
	}
	final String? teamMoney = jsonConvert.convert<String>(json['team_money']);
	if (teamMoney != null) {
		myTeamDataInfo.teamMoney = teamMoney;
	}
	final String? teamCount = jsonConvert.convert<String>(json['team_count']);
	if (teamCount != null) {
		myTeamDataInfo.teamCount = teamCount;
	}
	final String? todayMoney = jsonConvert.convert<String>(json['today_money']);
	if (todayMoney != null) {
		myTeamDataInfo.todayMoney = todayMoney;
	}
	final String? levelName = jsonConvert.convert<String>(json['level_name']);
	if (levelName != null) {
		myTeamDataInfo.levelName = levelName;
	}
	final String? copartnerName = jsonConvert.convert<String>(json['copartner_name']);
	if (copartnerName != null) {
		myTeamDataInfo.copartnerName = copartnerName;
	}
	return myTeamDataInfo;
}

Map<String, dynamic> $MyTeamDataInfoToJson(MyTeamDataInfo entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['avatar'] = entity.avatar;
	data['level_id'] = entity.levelId;
	data['copartner_id'] = entity.copartnerId;
	data['team_money'] = entity.teamMoney;
	data['team_count'] = entity.teamCount;
	data['today_money'] = entity.todayMoney;
	data['level_name'] = entity.levelName;
	data['copartner_name'] = entity.copartnerName;
	return data;
}

MyTeamDataList $MyTeamDataListFromJson(Map<String, dynamic> json) {
	final MyTeamDataList myTeamDataList = MyTeamDataList();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		myTeamDataList.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		myTeamDataList.name = name;
	}
	final String? avatar = jsonConvert.convert<String>(json['avatar']);
	if (avatar != null) {
		myTeamDataList.avatar = avatar;
	}
	final String? levelId = jsonConvert.convert<String>(json['level_id']);
	if (levelId != null) {
		myTeamDataList.levelId = levelId;
	}
	final String? copartnerId = jsonConvert.convert<String>(json['copartner_id']);
	if (copartnerId != null) {
		myTeamDataList.copartnerId = copartnerId;
	}
	final String? pid = jsonConvert.convert<String>(json['pid']);
	if (pid != null) {
		myTeamDataList.pid = pid;
	}
	final String? node = jsonConvert.convert<String>(json['node']);
	if (node != null) {
		myTeamDataList.node = node;
	}
	final String? teamMoney = jsonConvert.convert<String>(json['team_money']);
	if (teamMoney != null) {
		myTeamDataList.teamMoney = teamMoney;
	}
	final String? teamCount = jsonConvert.convert<String>(json['team_count']);
	if (teamCount != null) {
		myTeamDataList.teamCount = teamCount;
	}
	final String? isSlide = jsonConvert.convert<String>(json['is_slide']);
	if (isSlide != null) {
		myTeamDataList.isSlide = isSlide;
	}
	final String? levelName = jsonConvert.convert<String>(json['level_name']);
	if (levelName != null) {
		myTeamDataList.levelName = levelName;
	}
	final String? copartnerName = jsonConvert.convert<String>(json['copartner_name']);
	if (copartnerName != null) {
		myTeamDataList.copartnerName = copartnerName;
	}
	final String? createdAt = jsonConvert.convert<String>(json['created_at']);
	if (createdAt != null) {
		myTeamDataList.createdAt = createdAt;
	}
	return myTeamDataList;
}

Map<String, dynamic> $MyTeamDataListToJson(MyTeamDataList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['avatar'] = entity.avatar;
	data['level_id'] = entity.levelId;
	data['copartner_id'] = entity.copartnerId;
	data['pid'] = entity.pid;
	data['node'] = entity.node;
	data['team_money'] = entity.teamMoney;
	data['team_count'] = entity.teamCount;
	data['is_slide'] = entity.isSlide;
	data['level_name'] = entity.levelName;
	data['copartner_name'] = entity.copartnerName;
	data['created_at'] = entity.createdAt;
	return data;
}